#include <bits/stdc++.h>

using namespace std;
struct Fruit
{
    string name;
    int price;
    bool operator<(const Fruit &f) const
    {
        return f.price<this->price;
    }
} apple,pear,banana;
int main_122()
{
    priority_queue<Fruit> pq;
    apple.name="apple",apple.price=20;
    pear.name="pear",pear.price=15;
    banana.name="banana",banana.price=31;
    pq.push(apple),pq.push(pear),pq.push(banana);
    while (!pq.empty())
    {
        printf("%s %d\n",pq.top().name.c_str(),pq.top().price);
        pq.pop();
    }
    return 0;
}
